﻿using Exam.infranstuctrue.Dto.Request.Task;
using Exam.infranstuctrue.Dto.Respones;
using Exam.infranstuctrue.Tools.Attributes;

namespace Exam.Service.Interface
{
    [IProvider]
    public interface ITaskServer
    {
        /// <summary>
        /// 获取任务列表
        /// </summary>
        /// <param name="limit"></param>
        /// <param name="page"></param>
        /// <param name="key"></param>
        /// <returns></returns>
        Task<ApiResult> GetTask(string? token="",int page = 1, int limit = 10, string? key = "");
        /// <summary>
        /// 添加任务
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> AddTask(TaskDto dto); 
        /// <summary>
        /// 修改任务
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> UpdateTask(TaskDto dto);
        /// <summary>
        /// 获取单个任务
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> UpdateEchoTask(string tid,string? token=null);
        /// <summary>
        /// 删除任务
        /// </summary>
        /// <param name="tid"></param>
        /// <param name="token"></param>
        /// <returns></returns>
        Task<ApiResult> DeleteTask(string tid,string? token=null);
        Task<ApiResult> TaskPaper();
        Task<ApiResult> QuestionLv();
    }
}
